#include <bits/stdc++.h>
using namespace std;
template <typename T> void read(T &x){
    x = 0; int f = 1; char c = getchar();
    for (; !isdigit(c); c = getchar()) if (c == '-') f = -1;
    for (; isdigit(c); c = getchar()) x =  (x << 3) + (x << 1) + (c ^ 48);
    x *= f;
}
#define ll long long
const int maxn = 1e5 + 10;
// open the freopen
int n;
int a[maxn];
int cnt[maxn];
int ans;
int main(){
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    read(n);
    for (int i = 1; i <= n; i++) read(a[i]);
    sort(a + 1, a + n + 1);
    int t = 0;
    for (int i = 1; i <= n; i++){
        if (a[i] != a[i - 1]) t++;
        cnt[t]++;
    }
    for (int i = 1; i <= t; i++){
        ans -= min(ans, cnt[i]);
        ans += cnt[i];
    }
    printf("%d", ans);
    return 0;
}
